package com.hyj.langchain4j_springboot.service;

import dev.langchain4j.agent.tool.P;
import dev.langchain4j.agent.tool.Tool;
import org.springframework.stereotype.Service;

@Service
public class ToolsService {
    @Tool("长沙有多少个名字的")
    public Integer changshaNameCount(@P("姓名") String name){
        System.out.println(name);
        return 1;
    }

    @Tool("退票")
    public String cancelBooking(@P("姓名") String name,@P("订单号")String orderId){
        System.out.println(name);
        System.out.println(orderId);
        return "您的订单："+orderId+"已经退票成功";
    }
}
